import { ApiProperty, OmitType, PartialType } from "@nestjs/swagger";
import { UsersDto } from "src/db/dto";
import { ResponseBodyDataDto } from "src/dto";

export class LoginSuccess extends ResponseBodyDataDto {
  @ApiProperty({
    type: Object,
    properties: {
      token: {
        type: 'string',
        example: 'fdafdfadfad',
        description: '用户验证Token'
      }
    }
  })
  data: {
    token: string
  };
}

class UserInfoDto extends OmitType(UsersDto, ['password', 'isDeleted']) { }

export class CurrentUserInfoDto extends ResponseBodyDataDto {
  @ApiProperty({
    type: UserInfoDto,
    description: '用户信息'
  })
  data: UserInfoDto
}